package com.jt.www.admin.stats.controller;

import com.jt.www.admin.stats.service.SzAzAnalysisService;
import com.jt.www.model.Insurancedata.DataApiBean;
import com.jt.www.model.reps.ResultDTO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

/**
 * @author admin_ltf
 * @create 2019-05-18 19:19
 */
@Api(value = "实责及安责分析表", tags = {"AZ-STATS-API"}, description = "实责及安责分析表")
@RestController
@RequestMapping(value = "/api/")
public class SzAzAnalysisController {

    public static final Logger log = LoggerFactory.getLogger(SzAzAnalysisController.class);

    @Autowired
    private SzAzAnalysisService szAzAnalysisService;

    /**
     * 实责与安责同期投保情况明细表
     *
     * @param
     * @return
     */
    @ApiOperation(value = "实责与安责同期投保情况明细表", notes = "实责与安责同期投保情况明细表", httpMethod = "POST")
    @PostMapping(value = "v1/insure_details")
    public ResultDTO<Map<String, Object>> searchAzxInsInfo(@RequestBody DataApiBean dataApiBean) {
        // @RequestBody SzAzAnalysisParamVO vo   SzAzAnalysisResultVO

        ResultDTO resultMap = szAzAnalysisService.searchAzxInsInfo();
        return resultMap;
    }

    //  年度实责转化安责情况表  SzToZaParamVO  SzToAzResultVO

    @ApiOperation(value = "年度实责转化安责情况表", notes = "年度实责转化安责情况表", httpMethod = "POST")
    @PostMapping(value = "v1/transform_details")
    public ResultDTO<Map<String, Object>> searchSzToAzInfo(@RequestBody DataApiBean dataApiBean) {

        ResultDTO resultMap = szAzAnalysisService.searchSzToAzInfo();


        return resultMap;
    }

    //    安责险统计表  AzxParamVO AzxResultVO
    @ApiOperation(value = "安责险统计表", notes = "安责险统计表", httpMethod = "POST")
    @PostMapping(value = "v1/liability_details")
    public ResultDTO<Map<String, Object>> searchAzxInfo(@RequestBody DataApiBean dataApiBean) {

        ResultDTO resultMap = szAzAnalysisService.searchAzxInfo();


        return resultMap;
    }
}
